A*N*T*Z

ANTIA'S NEW TRUE Z \ H EROES




- Custom user rooms -




As you already know, in ANTZ, you can open user maps (files with the '.USR' extension) from the game menu. But how to create them? What do you need for it? Is it difficult?

If you want to create your own rooms, we'll show you the way - just follow these steps, and you'll be able to create the room.





- First room: step by step -


As we already suggested, creating the user rooms is very simple. The only program you will need is common 'Microsoft Visual N++' (also known as 'Notepad').



Step 1: Creating the file

In the 'DATA\UserLevels' subdirectory of the game, create a file named 'MyFirstRoom.usr' and open it in Notepad.



Step 2: The shape of the room, walls and paths

Write these lines into the file (without the headline, just those asterisks):

MyFirstRoom.usr
**********
****   * *
*      * *
***      *
**   *****
**    ****
*       **
**  *   **
**  ******
**********

This way, we'll create a room 10 by 10 squares big. On the places of the asterisks, there will be walls, on the places of spaces, there will be empty squares. Walls are very important - every room has to be completely surrounded by walls (to the very edge of the room), so the ants won't be able to 'escape' from the room. This means all lines of the map have to be of the same length. If you break any of these rules, and create something like this:

MyFirstRoom.usr
   *******
****   * *
*      * *
***      *
 *   *****
**    ***
*       *
**  *   *
 *  *****
 ****

the game won't load the room and it will tell you that you have probably made a mistake. The maximal size of a room is limited to 24x24 squares, including the border walls.



Step 3: Becherovka and places to move it onto

The drops of Becherovka can be added to the map by writing the character b (small 'b') on the desired place. The place player has to move Becherovka onto (called 'lift-zone') is marked by the ? character. There has to be as many Becherovka drops as the number of the lift-zones at least - otherwise, the game will warn you. So, let's add two Becherovka drops and two lift-zones to our room:

MyFirstRoom.usr
**********
****   *?*
*b     * *
***      *
**   *****
**    ****
*      b**
**  *  ?**
**  ******
**********

If you want to use Sokoban boxes instead of the drops, just use the x character. The advantage of boxes is that the window-cleaner does no harm to them.



Step 4: Populating the room

There is still something missing in our room - yes, there are no ants. We can add them with the T, F, B and W characters (standing for Tink, Flo, Benedict and Willi). We'll add all four of them to our room:

MyFirstRoom.usr
**********
****   *?*
*b     *F*
***      *
**T  *****
**    ****
*      b**
**B * W?**
**  ******
**********

If we just let it this way, all four ants would be facing upwards. To make them look in different directions at the start, we can add these four lines to the file (no matter whether we add them at the beginning, at the middle or at the end):

MyFirstRoom.usr
**********
****   *?*
*b     *F*
***      *
**T  *** *
**    ****
*      b**
**B * W?**
**  ******
**********

Tink: >
Flo: v
Benedict: ^
Willi: <

The characters after the colon (circumflex accent on the '6' key, small 'v' letter and lower and greater signs) are used as arrows to determine in which direction the ant will be looking. You can use English (Tink, Flo, Benedict, Willi) or Czech (Tink, Flo, Benedikt, Vilφk) names of the ants, if you want to forget about all those poor English-speaking users...



Step 5: Ants don't need just Becherovka

Besides Becherovka, the ants will meet other drops - water, window-cleaner, or repellent. These drops are placed in the map using these characters: w (water), o (window-cleaner) and r (repellent). So, we'll add some of them into our room - two drops of water, two drops of repellent and one drop of window-cleaner

MyFirstRoom.usr
**********
****   *?*
*br    *F*
***      *
**Tw *** *
**w   ****
*    o b**
**Br* W?**
**  ******
**********

Tink: >
Flo: v
Benedict: ^
Willi: <



Step 6: Objects of all kinds

Now, we're getting to the most interesting part - you can add objects of any shape into your room. Just write any non-reserved character on all squares the object should be placed on. You can use letters, digits or other characters, as long as it is allowed in the file names (i.e. no \ / : * ? " < > or |). Also, don't use commas or semicolons (, and ;).

The squares marked by the same character will then make up one object. So, let's add some objects to our room:

MyFirstRoom.usr
**********
**** $ *?*
*br  $L*F*
***   LLL*
**Tw *** *
**w   ****
*    o b**
**Br* W?**
**11******
**********

Tink: >
Flo: v
Benedict: ^
Willi: <

We have added these three objects:


  1. two-square horizontal object built-up from the 1 characters below Benedict
  2. two-square vertical object built-up from the $ characters in the upper part of the room
  3. four-square L-shaped object built-up from the L characters near Flo

This way, we can create objects with any shape (they don't even need to be from one part - you can create for example two magnets connected to each other, or a comma from a typewriter...)

You can use these characters to create objects safely:

acdefghijklmpqstyzACDEGHIJKLMNOPQRSYZ0123456789.;º'[]{}~!@#$%&_-+=

However, the best way would probably be to use mainly the digits.
If you don't have to, don't use any letters with accents, carons or other diacritical marks.
Also, try to use either only the small letters, or only the capital letters - Windows aren't case-sensitive (in contrary to Linux, for example), so they don't distinguish between small and capital letters in file names. This would lead to difficulties when loading image files for our room.



Step 7: Gardening - adding the leaves

Another important thing in the game are leaves - they look pretty good, and, primarily, they can be eaten. You can attach leaves to any existing object, or you can create a leaf as a stand-alone object (which can be whole eaten).

You can add the stand-alone leaves with the n, u, ( and ) characters:

n for a stand-alone leaf pointing upwards     
u for a stand-alone leaf pointing downwards   
( for a stand-alone leaf pointing to the left 
) for a stand-alone leaf pointing to the right

The leaves attached to an object have to be placed right next to it, pointing in the right direction (i.e. away from the onject). The ^, v, < and > characters are used for them:

^ for an attached leaf pointing upwards     
v for an attached leaf pointing downwards   
< for an attached leaf pointing to the left 
> for an attached leaf pointing to the right

So, we can add some leaves to our room:

MyFirstRoom.usr
**********
****<$ *?*
*br  $L*F*
***  vLLL*
**Tw *** *
**w   ****
*)   o b**
**Br*nW?**
**11******
**********

Tink: >
Flo: v
Benedict: ^
Willi: <

Now, we've added two leaves (one pointing downwards, the other one to the left) to the object from the $ characters. Then, we have also added two stand-alone leaves to our room - one of them near Benedict, and the other one next to Willi.



Step 8: Still pictures and pictures in motion

Now, our room is de facto already complete - we can open it, play it, save the solution and so on. However, it doesn't look very good - the walls are grey, and the objects are drawn as some blue rectangles. The solution of this is quite easy - you just have to copy the right graphic files into the subdirectory 'DATA\UserLevels\UserGraphics' and rename them so the room recognizes them.


-Background image-

The image for the background should consist of squares either with a wall, or with a path - players should be able to recognize walls at first sight.

Mostly, ANTZ use background image in the resolution 8x8 pixels for one square, sometimes 32x32 pixels for one square. There is no limit to this resolution, but images with the resolution lower than 8x8 pixels for one square look really blocky, and giving the image a resolution bigger than 32x32 pixels is pointless, because the game displays it in this resolution anyway.

The image file can be saved in .BMP or .TGA format, the file name must be 'RoomNameBackground.bmp', or 'RoomNameBackground.tga'.

For our first room, let's take the already prepared file named 'Background.bmp' and rename it to 'MyFirstRoomBackground.bmp'.

And, finally, we'll add the line with the real image size in pixels (80x80 pixels, in our case) to the room file (again - the position of the line in the file doesn't matter):

MyFirstRoom.usr
map size: 80 x 80 pixels

**********
****<$ *?*
*br  $L*F*
***  vLLL*
**Tw *** *
**w   ****
*)   o b**
**Br*nW?**
**11******
**********

Tink: >
Flo: v
Benedict: ^
Willi: <

The line does not have to contain exactly this - the game accepts any line starting with 'map size', which contains two numbers after the colon - the real width and height of the image. The other bits ('x', 'pixels' and other serve just for reading purposes - you can write them in shorter form, or you may skip them) - for example, the game accepts even the line 'map size:80-80'.


-Object images-

Assigning pictures to the objects isn't much harder. For each object built-up from its characters (i.e. no drops or leaves), create or find a file with the right image (don't care about any leaves - they'll be displayed automatically). Then, rename the files to 'RoomNameObjectCharacter.bmp' or 'RoomNameObjectCharacter.tga'.

TGA files can contain so-called transparency mask, which determines the transparency level of each pixel of the image (this way, you can create semi-transparent images of glass objects, for example). BMP images don't support this; in BMP image, the game takes the white color (RGB: 255, 255, 255) and makes it transparent - therefore, in BMP images, only use pure white on the places you want to be rendered as transparent.

The scale of the object images has to be 1:1, i.e. each square has to be 32x32 pixels big. Each object can be also animated - you just have to put all animation frames into the picture, one after another (in one row).

We'll need three pictures for our room:


  1. 64x32 pixels big picture 'MyFirstRoom1.tga' for the object built-up from 1 characters below Benedict
  2. 32x64 pixels big picture 'MyFirstRoom$.tga' for the object built-up from $ characters in the upper part of the room
  3. 96x64 pixels big picture 'MyFirstRoomL.bmp' with four animation frames for the object built-up from L characters near Flo

You can find these pictures in the 'DATA\UserLevels\UserGraphics' subdirectory, named 'Branch1.tga', 'Branch2.tga' and 'SharkNail.bmp'. You just have to rename these files.

Every object needs its own picture file. Then, for each object with a picture, add the following line to the room file:

'object ObjectCharacter: N frame(s), XY pixels'

MyFirstRoom.usr
map size: 80 x 80 pixels

**********
****<$ *?*
*br  $L*F*
***  vLLL*
**Tw *** *
**w   ****
*)   o b**
**Br*nW?**
**11******
**********

Tink: >
Flo: v
Benedict: ^
Willi: <

object 1: 1 frame, 64 x 32 pixels
object $: 1 frame, 32 x 64 pixels
object L: 4 frames, 96 x 64 pixels

Again, the 'frame(s)', 'pixels' and such parts are not important - the game accepts even such lines like 'object L: 4-96-64' or 'object L: Dear computer, the L image has (I hope ) 4 frames, and it is 96 pixels wide and 64 pixels high'. Only the sequencing frames - width - height is obligatory.

The width and height represent the actual size of one frame, not the whole picture file. The whole size of the image should be set so that the frames fill the entire area of the image (don't leave the image bigger than necessary).



Step 9: Further capabilities

The user room files allow you to achieve some more things: for example, if you are trying to create a Sokoban-like room, it is a good idea to switch off the displaying of the lift-zones (the darker spots). You can achieve this by adding the line

'show lift-zones: 0'

Then, don't forget to mark the location of the lift-zones in the background image (e.g. with those green dots) - otherwise, the players won't be very grateful.


You can also add comments to your file - anything from the semicolon to the end of the line is ignored by the game.


The game itself also adds the line containing the number of steps in the best solution, like

"solution: 286"





- It talks! -


Now, our room is almost perfect. It lacks just one thing - some dialogue, or at least some comment from the ants. We can easily achieve even this.

In the 'DATA\UserLevels\UserDialogs' subdirectory, we'll create a file nemed 'RoomName.dlg', i.e. in our case, 'MyFirstRoom.dlg'.

Then, we'll enter the sentences to be said. Each sentence is written on two lines. On the first line, there are its starting conditions, on the second line, there are its properties and the text itself. There can be no empty lines between these two lines. On the other hand, you can add empty lines between the sentences - it makes your dialogue file easier to read.


Starting conditions

Every sentence has one or more starting conditions, which determine, when the sentence will be said. The sentence starts, when all its conditions are accomplished. You can enter more than one condition for each sentence - just separate them with commas on the line, like.:

'Time > 5000, Steps >= 4, LeavesEaten = 0'

Each condition has the left-side term, the right-side term and a comparison operator. You can use these comparison operators:

=  (the left side is equal to the right side)           
<> (the left side is not equal to the right side)       
>= (the left side is greater or equal to the right side)
<= (the left side is lower or equal to the right side)  
>  (the left side is greater than the right side)       
<  (the left side is lower than the right side)         

The terms can contain variables and a constant, which is added to it or subtracted from it (e.g. +30, -1 etc.) If there is a variable in the term, it must be placed on the first place - all constants must be typed after it. There can be one variable on each side of the condition at most. ANTZ support these variables:


Time
, Steps, LeavesEaten, Tink X, Tink Y, Flo X, Flo Y, Benedict X, Benedict Y, Willi X, Willi Y, ObjectByChar ? X, ObjectByChar ? Y, ObjectByIndex ? X, ObjectByIndex ? Y, AlreadySaid #


Time - Time that has passed since the start of the room, in milliseconds

Steps - The number of steps player has already made

LeavesEaten - The number of leaves Willi has already eaten

Tink X, Flo X, Benedict X, Willi X - Horizontal position of the respective ant. The left edge of the map has the X coordinate equal to 1, but there has to be a wall on it. So, the lowest meaningful value is 2 - then, the ant is standing at the left edge of the map.
Tink Y, Flo Y, Benedict Y, Willi Y - Vertical position of the respective ant. The upper edge of the map has the Y coordinate equal to 1, but there has to be a wall on it. So, the lowest meaningful value is 2 - then, the ant is standing at the upper edge of the map.

ObjectByChar ? X - Horizontal position of the upper left corner of the object. Instead of the question mark, insert the character, from which the object is built-up. You can obtain information only about objects consisting of their characters this way. You can't get information about drops or stand-alone leaves this way.
ObjectByChar ? Y - Vertical position of the upper left corner of the object. Instead of the question mark, insert the character, from which the object is built-up.

ObjectByIndex ? X - Horizontal position of the upper left corner of the object. Instead of the question mark, insert the index of the object. This way, you can access all objects - each object in the game has its index. The objects are given numbers, starting from 1, increasing from left to right, and from top to bottom. However, the easiest way of finding out the object's index is to open your room in the game: then, hold down the Control key - on all objects, you will see their indexes.
ObjectByIndex ? Y - Vertical position of the upper left corner of the object. Instead of the question mark, insert the index of the object.

AlreadySaid # - This determines, whether the chosen sentence has been already said, or not. Instead of the hash sign, insert the ID (identification number, see below) of the sentence. If the designated sentence has been said already, the value of this variable will be equal to 1. If it hasn't been said yet, the value will be equal to 0. Each sentence can be said only once.


Then, the lines with the conditions can look like these (without quotation marks):

'Time > 7000, Tink X = ObjectByIndex 10 X + 1, Tink Y = ObjectByIndex 10 Y'
...which means...
Run the sentence, if at least 7 seconds have passed since the entering of the room, and Tink is on the square to the right from the upper left corner of the object with the index 10.

'Steps >= 20, ObjectByChar L X = 2, AlreadySaid 5 = 0'
...which means...
Run the sentence, if the player has already made 20 steps at least, the object built-up from the L characters is at the left edge of the map, and the sentence with ID 5 hasn't been said yet.


Sentence properties

The parameters of the sentence and the text itself is written on the second line. It begins with the characters -> or =>, followed by the name of the speaker (Tink, Flo, Benedict, Willi, or their Czech names) and a colon. Then ,the text of the sentence is written - it is surrounded by two circumflex accents (^), and it is divided into two parts by the vertical line character (|). The first part of the text is the English part, the second one is the Czech part. If you don't feel like composing some Czech dialogues, you can skip the part after the vertical line - the line itself, however, must be typed always.

'-> Willi: ^Hello, player!|Ahoj, hrßΦi!^'
'-> Willi: ^Hello, player!|^'

Then, you must include the information about the ID (identification number) of the sentence, the delay after the end of the previous sentence (in milliseconds), and the face of the ant while saying this sentence. You can write these parameters in any order. Delay and Face are optional.

'-> Willi: ^Oof, I hope you don't want me to eat that all, player...|Uf, hrßΦi, doufßm, ₧e nechceÜ, abych to sn∞dl vÜechno...^ ID: 17 Delay: 1500 Face: 1'

This sentence will have ID equal to 17, it will be said at least one and a half second after the end of the previous sentence, and Willi will have his eyes wide open when saying it.

If there is no Delay parameter specified, it will be set to 1000 (one second) automatically. If there is no Face parameter specified, the ant will have the neutral face 2. The game contains these faces:

  1. Eyes wide open        
  2. Neutral face          
  3. Eyes ajar             
  4. Eyes wide shut        
  5. Sad face              
  6. Tink - wink           
    Flo - grin            
    Benedict - frown      
    Willi - raised eyebrow
  7. Surprised face        

So, finally, both lines of the sentence can look like this:

MyFirstRoom.dlg
LeavesEaten >= 3
-> Willi: ^Oof, I hope you don't want me to eat that all, player...|Uf, hrßΦi, doufßm, ₧e nechceÜ, abych to sn∞dl vÜechno...^ ID: 17 Delay: 1500 Face: 1

This sentence will start, when Willi eats three or more leaves in our room. He will have his eyes wide open.


Voice in MP3

If you have MP3 file with the desired sentence, you can simply copy it into the 'DATA\UserLevels\UserSpeech' subdirectory and rename it to 'RoomNameSentenceID_LanguageNumber.mp3' - the number of the language can be either 1 for English, or 2 for Czech. Willi's sentence from the previous example would have Czech file called 'MyFirstRoom17_2.mp3' - there is a file named 'WilliOof_2.mp3' in the directory - you just have to rename it. However, it will sound only if you switch the language to Czech - you'll have to record your own sentences for a conversation in English...

You should use MP3 files with lower quality - the files with higher bitrate cause the game to slow down.


Starting the sentence in more different ways

If you want one sentence to be activated in more ways, you can write it more times into the .DLG file - each time with the same text and ID, but with different conditions. This way, the sentence will be said (still just once) after the accomplishment of any listed group of conditions.

MySecondRoom.dlg
Tink X = ObjectByIndex 1 X - 1, Tink Y = ObjectByIndex 1 Y
-> Tink: ^I'm at the drop!|Jsem u kapky!^ ID: 34

Tink X = ObjectByIndex 1 X + 1, Tink Y = ObjectByIndex 1 Y
-> Tink: ^I'm at the drop!|Jsem u kapky!^ ID: 34

Tink X = ObjectByIndex 1 X, Tink Y = ObjectByIndex 1 Y - 1
-> Tink: ^I'm at the drop!|Jsem u kapky!^ ID: 34

Tink X = ObjectByIndex 1 X, Tink Y = ObjectByIndex 1 Y + 1
-> Tink: ^I'm at the drop!|Jsem u kapky!^ ID: 34

In this case, Tink should announce he's at the drop (the object with the index 1), no matter from what direction he comes to it.


Sequences of sentences - dialogues.

If you want more sentences to be said one after another, so they make up a dialogue, you just need to adjust their conditions. Then, don't forget to set the Delay value - for example, if you split one sentence into two, the second one should have its Delay parameter set to 0, so it starts immediately after the end of the previous one. If you don't set this parameter, its value will be 1000 milliseconds.

MyThirdRoom.dlg
Time > 5000
-> Flo: ^Let's show our player how to make dialogues!|Poj∩me hrßΦi ukßzat, jak na rozhovory!^ ID: 1 Face: 1

AlreadySaid 1 = 1
-> Tink: ^Okay.|Tak fajn.^ ID: 2 Face: 3

AlreadySaid 2 = 1
-> Flo: ^It's a pity...|Jenom je Ükoda...^ ID: 3 Face: 5

AlreadySaid 3 = 1
-> Flo: ^...we have no MP3 files for this dialoque.|...₧e pro tenhle rozhovor nemßme ₧ßdnΘ MP3.^ ID: 4 Delay: 0 Face: 6

AlreadySaid 4 = 1
-> Tink: ^Well, I think this should be enough.|No, myslφm, ₧e tohle mu bude staΦit.^ ID: 5 Delay: 1500 Face: 6


Sentences not only from the ants

Not just ants can say the sentences - there can be talking objects, storyteller's sentences, etc...

You just have to write any other name as the name of the speaker, and add the color-determining string at the beginning of both English and Czech part of the sentence. The string has the form of #$00ffffff, where the last six hexadecimal characters represent the the B(blue), G(green) and R(red) components of the color. The first four characters have to stay #$00. If you enter no color-string, the resulting color will be grey.

#$00000000 - black  
#$00ffffff - white  
#$00ff0000 - blue   
#$0000ff00 - green  
#$000000ff - red    
#$00ffff00 - cyan   
#$00ff00ff - magenta
#$0000ffff - yellow 
etc...

If your sentence contains an empty text (i.e. ^|^), and no ant is the speaker of it, the sentence won't be displayed, but if the game finds the respective MP3 file, it will play the file - this way, you can add sounds like ringing phone, for example, to your room. In the next example, we'd need the 'MyFourthRoom15_1.mp3' file for the English version, and 'MyFourthRoom15_2.mp3' for the Czech one:

MyFourthRoom.dlg
Time > 2000
-> Nail: ^#$00997676Hello...|#$00997676Ahoj...^ ID: 1 Face: 1

Benedict X = 4, Benedict Y = 6
-> Phone: ^|^ ID: 15


Tricks with conditions, or 'Once upon a time...'

If you need to say some sentence depending on whether certain conditions were accomplished somewhen in the past, you can use a small trick:

Insert an empty sentence (i.e. with ^|^ text, and, of course, with no MP3 sound), with no ant as a speaker. Then, let it start on the desired conditions - for example, when Flo is in the corner of the room. Because the text of the sentence is empty, nothing will seem to happen. However, the AlreadySaid variable of this sentence will be set to 1. Later on, you can utilize it:

MyFifthRoom.dlg
Flo X = 2, Flo Y = 2
-> Nothing: ^|^ ID: 318

Steps >= 100, AlreadySaid 318 = 0, AlreadySaid 320 = 0
-> Flo: ^Oof, so many steps and I haven't been to the corner yet!|Uf, tolik jsem se nachodila, a jeÜt∞ jsem ani nebyla v rohu!^ ID: 319

Steps >= 100, AlreadySaid 318 = 1, AlreadySaid 319 = 0
-> Flo: ^Oof, so many steps... At least, I've been to the corner...|Uf, tolik jsem se nachodila... Alespo≥, ₧e u₧ jsem byla v rohu...^ ID: 320






- It plays! -


If you want your room to look relly profesionally, you can even add your own MIDI music. To do this, you just have to create the "RoomName" subdirectory in the "DATA\UserLevels\UserMusic" directory and place one or more ".mid" files in it. These files will be played in random order in your room. You can see this in the "Adolf" room with one music file. If you don't create this directory, the common in-game music will be playing.






- Epilogue -


Now, you know everything you need to create your own rooms. The important thing is that your room has to be solvable - however, that doesn't mean it has to be easy.

If you create any room, we'll be happy if you send us a mail with it (with all necessary files included - images, dialogues. MP3 files etc.)

We'll try to solve all your rooms, and if we like them, we can even add some missing graphics (rarely, we could even record the voices for you) and send it back to you, together with our shortest solution. Besides this, we can send you custom rooms made by other players. And, if possible, we'll gladly put them on the web page of the game.

In the "DATA\UserLevels" subdirectory, there are already two rooms prepared - "Adolf" and "LongDrinkRemake". The first one is a replica of one of the most famous Sokoban levels, the other one is a remake of one of the ANTZ rooms. Besides this, you can find also some MP3 files with speech and the images of some common objects in the directory.

So, now you just need some idea...



Copyright © 2004 - Karel èt∞pka jr.